import { axios } from "../../../utils/request";

const api = {
    pageCrmCallAgentBySystem: "/crm/callAgent/pageCrmCallAgentBySystem",    //分页查询坐席（系统）
    saveCrmCallAgent: "/crm/callAgent/saveCrmCallAgent",                    //保存坐席
    batchEnable:"/crm/callAgent/batchEnable",                               //批量启用
    batchDisable:"/crm/callAgent/batchDisable",                             //批量禁用
    deleteByIds:"/crm/callAgent/deleteByIds",                               //批量删除
    pageCrmCallAgentCustomerVo: "/crm/callAgent/pageCrmCallAgentCustomerVo",//分页查询坐席（租户）
    saveAgentByCompany: "/crm/callAgent/saveAgentByCompany",                //保存坐席（租户）
    deleteByIdsByCompany:"/crm/callAgent/deleteByIdsByCompany",                      //批量删除（租户）
    batchEnableByCompany:"/crm/callAgent/batchEnableByCompany",                      //批量启用（租户）
    batchDisableByCompany:"/crm/callAgent/batchDisableByCompany",                      //批量禁用（租户）
    getMyCrmCallAgent: "/crm/callAgent/getMyCrmCallAgent",                  //获取用户的坐席

    // distributeAgent: "/crm/callAgent/distributeAgent",                      //分配坐席（租户）
    pageCrmCallAgentUserVo: "/crm/callAgent/pageCrmCallAgentUserVo",        //坐席用户分配情况
    saveAgentOrder: "/crm/callAgent/saveAgentOrder",                        //新购坐席
    // dealAgentOrder: "/crm/callAgent/dealAgentOrder",                        //坐席订单交易成功
    
};


/**
 * 分页查询坐席（系统）
 */
export function pageCrmCallAgentBySystem(data) {
    return axios({
      url: api.pageCrmCallAgentBySystem,
      method: "post",
      data: data
    });
}

/**
 * 保存坐席
 */
 export function saveCrmCallAgent(data) {
    return axios({
      url: api.saveCrmCallAgent,
      method: "post",
      data: data
    });
}

/**
 * 批量启用
 */
export function batchEnable(data) {
    return axios({
      url: api.batchEnable,
      method: "post",
      data: data
    });
}

/**
 * 批量禁用
 */
 export function batchDisable(data) {
    return axios({
      url: api.batchDisable,
      method: "post",
      data: data
    });
}


/**
 * 批量删除（租户）
 */
 export function deleteByIdsByCompany(data) {
    return axios({
      url: api.deleteByIdsByCompany,
      method: "post",
      data: data
    });
}
/**
 * 批量启用（租户）
 */
 export function batchEnableByCompany(data) {
    return axios({
      url: api.batchEnableByCompany,
      method: "post",
      data: data
    });
}
/**
 * 批量禁用（租户）
 */
 export function batchDisableByCompany(data) {
    return axios({
      url: api.batchDisableByCompany,
      method: "post",
      data: data
    });
}

/**
 * 分页查询坐席（租户）
 */
export function pageCrmCallAgentCustomerVo(data) {
    return axios({
      url: api.pageCrmCallAgentCustomerVo,
      method: "post",
      data: data
    });
}

/**
 * 保存坐席（租户）
 */
 export function saveAgentByCompany(data) {
    return axios({
      url: api.saveAgentByCompany,
      method: "post",
      data: data
    });
}

/**
 * 批量删除(系统)
 */
 export function deleteByIds(data) {
    return axios({
      url: api.deleteByIds,
      method: "post",
      data: data
    });
}

/**
 * 获取用户的坐席
 */
export function getMyCrmCallAgent(parameter) {
    return axios({
      url: api.getMyCrmCallAgent,
      method: "get",
      params: parameter
    });
  }
// /**
//  * 分配坐席（租户）
//  */
//  export function distributeAgent(data) {
//     return axios({
//       url: api.distributeAgent,
//       method: "post",
//       params: data
//     });
// }
// /**
//  * 坐席用户分配情况
//  * @param {*} data 
//  * @returns 
//  */
export function pageCrmCallAgentUserVo(data) {
    return axios({
      url: api.pageCrmCallAgentUserVo,
      method: "post",
      data: data
    });
}
// /**
//  * 新购坐席
//  * @param {*} data 
//  * @returns 
//  */
export function saveAgentOrder(data) {
    return axios({
      url: api.saveAgentOrder,
      method: "post",
      data: data
    });
}
// /**
//  * 成交坐席（处理未未完成的订单）
//  * @param {*} data 
//  * @returns 
//  */
//  export function dealAgentOrder(data) {
//     return axios({
//       url: api.dealAgentOrder,
//       method: "post",
//       data: data
//     });
// }


